@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 */
body {
  @apply antialiased text-dark bg-white;
}

/* 链接样式 */
a {
  @apply text-primary hover:text-secondary transition-colors duration-200;
}

/* 容器样式 */
.container {
  @apply mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl;
}

/* 按钮样式 */
.btn {
  @apply inline-flex items-center justify-center font-medium rounded-md transition-all duration-200;
}
.btn-primary {
  @apply bg-[#1E3A8A] text-white hover:bg-[#2563EB] shadow-sm;
}
.btn-secondary {
  @apply bg-white text-[#1E3A8A] border border-[#1E3A8A] hover:bg-gray-50;
}
.btn-text {
  @apply text-[#1E3A8A] hover:text-[#2563EB] underline;
}
.btn-sm {
  @apply px-3 py-1.5 text-sm;
}
.btn-md {
  @apply px-4 py-2 text-base;
}
.btn-lg {
  @apply px-6 py-3 text-lg;
}
.btn-disabled {
  @apply opacity-50 cursor-not-allowed;
}

/* 卡片样式 */
.card {
  @apply bg-white rounded-lg shadow-sm border border-[#E5E7EB] overflow-hidden transition-all duration-300 hover:shadow-md;
}
/* 图片占位符效果 */
.card-img {
    background-color: #E5E7EB;
    background-image: linear-gradient(135deg, #E5E7EB 25%, #F3F4F6 25%, #F3F4F6 50%, #E5E7EB 50%, #E5E7EB 75%, #F3F4F6 75%, #F3F4F6 100%);
    background-size: 40px 40px;
    transition: opacity 0.3s ease;
}
.card-body {
  @apply p-4;
}
.card-title {
  @apply text-lg font-semibold text-[#111827] mb-2;
}
.card-desc {
  @apply text-[#4B5563] text-sm;
}

/* 标签样式 */
.tag {
  @apply inline-flex items-center px-3 py-1 rounded-full text-sm font-medium;
}
.tag-primary {
  @apply bg-[#1E3A8A]/10 text-[#1E3A8A];
}
.tag-success {
  @apply bg-[#10B981]/10 text-[#10B981];
}
.tag-error {
  @apply bg-[#EF4444]/10 text-[#EF4444];
}
.tag-warning {
  @apply bg-[#F59E0B]/10 text-[#F59E0B];
}
.tag-close {
  @apply ml-1.5 text-xs cursor-pointer hover:opacity-70;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* 过渡效果 */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}